// ignore_for_file: must_be_immutable, prefer_typing_uninitialized_variables

import 'package:aitao_flutter/res/r.dart';
import 'package:aitao_flutter/style/box_style.dart';
import 'package:aitao_flutter/style/color_style.dart';
import 'package:aitao_flutter/style/text_style.dart';
import 'package:flutter/material.dart';

class EmptyView extends StatelessWidget {
  EmptyView({Key? key, this.title = '暂无数据', this.emptyClickCallBack})
      : super(key: key);
  String title;
  var emptyClickCallBack;
  @override
  Widget build(BuildContext context) {
    return Container(
      color: ColorStyle.backGroundColor,
      child: Center(
        child: GestureDetector(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              Image.asset(ImagePath.assetsEmptyView),
              Box.vBox25,
              Text(
                title,
                style: Styles.greyText_14,
              )
            ],
          ),
          onTap: () {
            emptyClickCallBack();
          },
        ),
      ),
    );
  }
}
